<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        let p1 = Promise.reject('err');
        console.log(p1)
        p1.catch(reason=>{
            console.log(reason);
        })
    </script>
</body>
</html>